package com.cy.wenxinapi.controller;

import com.cy.wenxinapi.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: c
 * @date: 2024/3/14 9:34
 * @description:
 */

@RestController
public class demoController {

    @RequestMapping("/api/auth/login")
    public String usersLogin() {
        String response = "{\n" +
                "    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\",\n" +
                "    \"user_data\": [\n" +
                "        {\n" +
                "        \"id\": 1,\n" +
                "        \"name\": \"Jane\",\n" +
                "        \"avator\": \"照片路徑\"\n" +
                "        }\n" +
                "    ]\n" +
                "}";

        return response;
    }
    @RequestMapping("/api/users/signup")
    public String usersSignup() {
        String response = "{\n" +
                "    \"message\": \"註冊成功\",\n" +
                "}";

        return response;
    }


    @RequestMapping("/api/users/logout")
    public String userslogout() {
        String response = "{\n" +
                "    \"name\":\"jane\",\n" +
                "    \"email\": \"jane99168@gmail.com\",\n" +
                "    \"account\": \"jane99168\",\n" +
                "    \"password\": \"dfgdf441geDSFs\" // 必須8碼以上，且必須有大小寫字母及數字\n" +
                "}";

        return response;
    }

    @RequestMapping("/api/users/profile")
    public Result usersprofile() {
        String response = "{\n" +
                "    \"name\": \"Jane\",\n" +
                "    \"avator\": \"照片路徑\",\n" +
                "    \"phone\":0912345678,\n" +
                "    \"address\":\"台中市北北區XXXX\",\n" +
                "    \"sex\":\"F|M\",\n" +
                "    \"birthday\":\"2002/01/01\",\n" +
                "    \"status\":\"在學中\",\n" +
                "    \"highest_education\":\"大學\",\n" +
                "    \"seniority\": \"一年以下\",\n" +
                "    \"created_at\": \"2020-09-07T05:31:09.000000Z\",\n" +
                "}";


        return Result.ok(response);
    }


    @RequestMapping("/api/users/refresh")
    public String userrefresh() {
        String response = "{\n" +
                "    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c\"\n" +
                "}";

        return response;
    }


    @RequestMapping("/api/resumes")
    public String resumes() {
        String response = "{\n" +
                "    \"autobiography\":\"我來自......\"\n" +
                "    \"education\":[\n" +
                "        {\n" +
                "            \"school\": \"台中科技大學資訊管理系五專部\",\n" +
                "            \"admission_date\": \"2017/09/01\",\n" +
                "            \"date_of_graduation\": \"2022/06/01\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"school\": \"台中科技大學資訊管理系二技部\",\n" +
                "            \"admission_date\": \"2022/09/01\",\n" +
                "            \"date_of_graduation\": \"在學中\"\n" +
                "        }\n" +
                "    ],\n" +
                "    \"work_experience\":[\n" +
                "        {\n" +
                "            \"company\": \"創科資訊\",\n" +
                "            \"start_work\": \"2022/01/01\",\n" +
                "            \"position\":\"Intern\",\n" +
                "            \"resign\": \"2022/03/01\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"company\": \"鼎新\",\n" +
                "            \"start_work\": \"2023/06/01\",\n" +
                "            \"position\":\"開發工程師Intern\",\n" +
                "            \"resign\": \"在職中\"\n" +
                "        }\n" +
                "    ],\n" +
                "    \"Portfolio\":[\n" +
                "        {\n" +
                "            \"title\":\"\",\n" +
                "            \"description\":\"\"\n" +
                "        },\n" +
                "        {\n" +
                "            \"title\":\"\",\n" +
                "            \"description\":\"\"\n" +
                "        }\n" +
                "    ],\n" +
                "    \"skill\":[\"PHP\",\"Java\"]\n" +
                "}";

        return response;
    }
}
